package 所有的题类.F.树;

import 所有的题类.ZA.链表.TreeNode;

import javax.xml.bind.SchemaOutputResolver;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

public class 求根节点到叶节点数字之和 {

    /**
     *
     输入：root = [1,2,3]
     输出：25
     解释：
     从根到叶子节点路径 1->2 代表数字 12
     从根到叶子节点路径 1->3 代表数字 13
     因此，数字总和 = 12 + 13 = 25
     示例 2：

     输入：root = [4,9,0,5,1]
     输出：1026
     解释：
     从根到叶子节点路径 4->9->5 代表数字 495
     从根到叶子节点路径 4->9->1 代表数字 491
     从根到叶子节点路径 4->0 代表数字 40
     因此，数字总和 = 495 + 491 + 40 = 1026

     * @param root
     * @return
     */
    private static List<String> list = new ArrayList<>();
    public String sumNumbers(TreeNode root) {

        if(root==null){
            return "";
        }
        if(root.left==null && root.right==null){
            return root.val+"";
        }

        String s = sumNumbers(root.left);
        String s1 = sumNumbers(root.right);
        return null;
    }

    public static void main(String[] args) throws ExecutionException, InterruptedException {

        System.out.println(Integer.toBinaryString(-1));
        System.out.println();
        String[] split = "aaa".split("");
        String c=split[0];
        for (int i = 1; i < split.length; i++) {
        }
        System.out.println(Integer.toBinaryString(-1>>31));
        System.out.println(Integer.toBinaryString(1>>31));
        System.out.println(Integer.toBinaryString(-1>>31));
        //ExecutorService executorService = Executors.newFixedThreadPool(20);
        //Callable<Integer> objectCallable = new Callable<Integer>() {
        //    @Override
        //    public Integer call() throws Exception {
        //        Thread.sleep(10000);
        //        return null;
        //    }
        //};
        //Future<Integer> submit = executorService.submit(objectCallable);
        //Integer integer = submit.get();
        //System.out.println("1111");

    }


}
